package com.yupi.springbootinit.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("mc_message_delivery")
public class McMessageDelivery implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("message_id")
    private Long messageId;

    @TableField("receiver_type")
    private String receiverType; // USER / DEPT

    @TableField("receiver_id")
    private Long receiverId;

    @TableField("status")
    private String status; // UNREAD/READ/SENT/FAILED

    @TableField("read_at")
    private Date readAt;

    @TableField("sent_at")
    private Date sentAt;

    @TableField("created_at")
    private Date createdAt;

    @TableField("updated_at")
    private Date updatedAt;

    private static final long serialVersionUID = 1L;
}